﻿/**
 * @name umi 的路由配置
 * @param path  path 只支持两种占位符配置，第一种是动态参数 :id 的形式，第二种是 * 通配符，通配符只能出现路由字符串的最后。
 * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径，也可以是相对路径，如果是相对路径，会从 src/pages 开始找起。
 * @param routes 配置子路由，通常在需要为多个路径增加 layout 组件时使用。
 * @param redirect 配置路由跳转
 * @param wrappers 配置路由组件的包装组件，通过包装组件可以为当前的路由组件组合进更多的功能。 比如，可以用于路由级别的权限校验
 * @param name 配置路由的标题，默认读取国际化文件 menu.ts 中 menu.xxxx 的值，如配置 name 为 login，则读取 menu.ts 中 menu.login 的取值作为标题
 * @doc https://umijs.org/docs/guides/routes
 */
export default [
  // pad - 外
  {
    path: '/inspector',
    layout: false,
    component: './Inspector',
  },
  // pad - 内
  {
    path: '/criminal',
    layout: false,
    component: './Criminal',
  },
  {
    path: '/zuoyouPing',
    layout: false,
    component: './ZuoyouPing/index',
  },
  {
    path: '/',
    name: '首页',
    component: './Home/index',
  },
  {
    path: '/user',
    layout: false,
    routes: [
      {
        name: 'login',
        path: '/user/login',
        component: './User/Login',
      },
    ],
  },
  // {
  //   path: '/welcome',
  //   name: 'welcome',
  //   component: './Welcome',
  // },
  {
    path: '/prisoner',
    name: '被监管人管理',
    routes: [
      {
        path: '/prisoner',
        redirect: '/prisoner/index',
      },
      {
        path: '/prisoner/index',
        name: '被监管人列表',
        component: './Criminal/List/index',
      },
    ],
  },
  {
    path: '/meeting',
    name: '自助会见',
    routes: [
      {
        path: '/meeting',
        redirect: '/meeting/index',
      },
      {
        path: '/meeting/index',
        name: '会见登记',
        component: './Meeting/Index',
      },
    ],
  },
  {
    path: '/rollCall',
    name: '点名相关',
    routes: [
      {
        path: '/rollCall',
        redirect: '/rollCall/template',
      },
      {
        path: '/rollCall/template',
        name: '点名模板',
        component: './RollCall/Template',
      },
      {
        path: '/rollCall/record',
        name: '点名记录',
        component: './RollCall/Record',
      },
    ],
  },
  {
    path: '/doctor',
    name: '医务相关',
    routes: [
      {
        path: '/doctor',
        redirect: '/doctor/index',
      },
      {
        path: '/doctor/index',
        name: '电子病历档案',
        component: './Doctor/Files',
      },
      {
        path: '/doctor/record',
        name: '报病记录',
        component: './Doctor/Record',
      },
      {
        path: '/doctor/medication',
        name: '服药记录',
        component: './Doctor/Medication',
      },
    ],
  },
  {
    path: '/conversation',
    name: '谈话管理',
    routes: [
      {
        path: '/conversation',
        redirect: '/conversation/template',
      },
      // {
      //   path: '/conversation/type',
      //   name: '谈话类型',
      //   component: './Zhifa/fenxi',
      // },
      {
        path: '/conversation/template',
        name: '谈话模板',
        component: './Conversation/Template',
      },
      // {
      //   path: '/conversation/entryExit',
      //   name: '进出管理',
      //   component: './Conversation/EntryExit',
      // },
    ],
  },
  {
    path: '/event',
    name: '事件处置',
    routes: [
      {
        path: '/event',
        redirect: '/event/template',
      },
      {
        path: '/event/template',
        name: '事件管理',
        component: './Zhifa/fenxi',
      },
      {
        path: '/event/entryExit',
        name: '我的警情',
        component: './Zhifa/fenxi',
      },
      {
        path: '/event/tongji',
        name: '告警统计',
        component: './Zhifa/fenxi',
      },
    ],
  },
  {
    path: '/risk',
    name: '监所风险分析',
    routes: [
      {
        path: '/risk',
        redirect: '/risk/person',
      },
      {
        path: '/risk/person',
        name: '人员风险分析',
        component: './Risk/index',
      },
      {
        path: '/risk/room',
        name: '监室风险分析',
        component: './Risk2/index',
      },
      {
        path: '/risk/area',
        name: '监所风险分析',
        component: './Risk2/index',
      },
    ],
  },
  {
    path: '/cases',
    name: '协助破案分析预测',
    routes: [
      {
        path: '/cases',
        redirect: '/cases/person',
      },
      {
        path: '/cases/person',
        name: '人员核验',
        component: './Cases/Person/index',
      },
      {
        path: '/cases/result',
        name: '核验结果',
        component: './Cases/Result/index',
        menu: false,
      },
      {
        path: '/cases/clue',
        name: '线索甄别',
        component: './Cases/Clue/index',
      },
      {
        path: '/cases/clueResult',
        name: '甄别结果',
        component: './Cases/ClueDetail/index',
        menu: false,
      },
      {
        path: '/cases/search',
        name: '线索搜索',
        component: './Cases/Search',
      },
    ],
  },
  {
    path: '/zhifa',
    name: '执法监督管理',
    routes: [
      {
        path: '/zhifa',
        redirect: '/zhifa/yujing',
      },
      {
        path: '/zhifa/yujing',
        name: '执法监督预警',
        component: './Zhifa/yujing',
      },
      {
        path: '/zhifa/fenxi',
        name: '执法监督分析',
        component: './Zhifa/fenxi',
      },
    ],
  },
  // {
  //   name: 'list.table-list',
  //   path: '/list',
  //   component: './TableList',
  // },

  {
    path: '*',
    layout: false,
    component: './404',
  },
];
